﻿@inherits Vowei.Web.G18nWebViewPage<IEnumerable<Vowei.Core.Models.DurationModel>>
@using Vowei.Web.Models
@using Vowei.Web.Helpers
@using System.Web.Mvc.Html 

@{
    ViewBag.Title = "Details";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@T("指定项目[TODO:加上项目名称]进度")</h2>

<div id="viewpot"></div>

<script type="text/x-jquery-tmpl" id="item_template">
    <div><a href="/${TypeName}/Details/${ID}">${Title}</a>-
        起始日期；<input type="text" class="DateTimeClass" id="${ID}-StartDate" name="${ID}-StartDate">-
        工期：<input type="text" class="DateTimeClass" id="${ID}-Duration" name="${ID}-Duration">-
        计划结束日期：<input type="text" class="DateTimeClass" id="${ID}-DueDate" name="${ID}-DueDate"> 
    </div>
</script>

<script language="javascript" type="text/javascript">
@{
    var obj = new HtmlString(string.Format("var dataContext = {0};", ViewData[ViewHelpers.JsonObjectKey]));
}
    @obj

    heap_sort(dataContext, function (left, right) {
        return left.Lower - right.Lower;
    });

    applyServerTemplate(dataContext);
</script>